﻿using System;
using System.Collections.Generic;

namespace tlBasic.Application;

public interface ISysCacheService
{
    void AddCacheKey(string cacheKey);

    void DelByPattern(string key);

    void DelCacheKey(string cacheKey);

    bool Exists(string cacheKey);

    List<string> GetAllCacheKeys();

    T Get<T>(string cacheKey);

    string GetString(string cacheKey);

    void Remove(string key);

    void SetObject(string cacheKey, object value);

    void SetObject(string cacheKey, object value, TimeSpan expire);

    void SetString(string cacheKey, string value);

    void SetString(string cacheKey, string value, TimeSpan expire);


    List<string> GetPermission(long userId);

    void SetPermission(long userId, List<string> permissions);
    void ClearPermission(long userId);

    void SetTokenChange(long userId);


}